package com.liang.service;
import org.aspectj.lang.ProceedingJoinPoint;
public class CustomAop {
//    前置日志
    public void beforeLog(){
        System.out.println("打印日志前");
    }
//    后置日志
    public void afterLog(){
        System.out.println("打印日志后");
    }
//    环绕
    public void round(ProceedingJoinPoint jp) throws Throwable {
        System.out.println("环绕前");
        Object proceed = jp.proceed();//相当于执行log方法
        System.out.println("环绕后");
        System.out.println(proceed);
    }

}
